import { routes } from './routes';
import NProgress from 'nprogress';
import { createRouter, createWebHashHistory } from 'vue-router';
NProgress.configure({
  showSpinner: false,
});

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
router.beforeEach((to, from, next) => {
  NProgress.start();
  next();
});
router.afterEach(() => {
  NProgress.done();
});
export default router;
